function getXmlHttpObject() {
    var xmlHttp=null;
    try {
        xmlHttp=new XMLHttpRequest();
    } catch (e) {
        try {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
        } catch (e) {
            xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
    }
    return xmlHttp;
}

function sendXmlHttpRequest(add, content) {
    request = getXmlHttpObject();
    request.open("POST", add, false);
    request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    request.send(content);
    return request.responseText;
}

function getXMLDOM() {
    var xmlDom = new ActiveXObject("Microsoft.XMLDOM");
    xmlDom.async = false;
    return xmlDom;
}